/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package com.plian.system.service.pm.annualdonationexecutemain;

import com.plian.system.entity.pm.annualdonationexecutemain.AnnualDonationExecuteMain;
import com.plian.system.model.R;
import com.plian.system.mybatis.base.BaseService;
import com.plian.system.vo.pm.annualdonationexecutemain.AnnualDonationExecuteMainVO;

import javax.servlet.http.HttpServletResponse;
import java.io.File;

/**
 * 企业年度捐赠计划执行 服务类
 *
 * @author gangan
 * @since 2019-10-25
 */
public interface IAnnualDonationExecuteMainService extends BaseService<AnnualDonationExecuteMain> {

	/**
	 * 初始化
	 * @param reportCompanyId 填报单位
	 * @param year 年度
	 * @return
	 */
	String initialization(String reportCompanyId, String year);

	/**
	 * 校验唯一
	 *@param id 主键
	 * @param code 编号
	 * @param filingCode 备案编号
	 * @return 错误明细
	 */
	String checkIsExisted(Long id, String code, String filingCode);

	/**
	 * VO保存，同时保存上下级
	 * @param annualDonationExecuteMain
	 * @return
	 */
	boolean submit(AnnualDonationExecuteMain annualDonationExecuteMain);

	/**
	 * 区子表数据（更新）
	 * @param id 主键
	 * @return boolean
	 */
	Boolean changeAll(Long id);

	/**
	 * 给数据带上子表
	 * @param annualDonationExecuteMainVO javabean
	 * @return 带子表的数据
	 */
	AnnualDonationExecuteMainVO setChild(AnnualDonationExecuteMainVO annualDonationExecuteMainVO);

	/**
	 * 根据id打印
	 * @param id 主键
	 * @return File
	 */
	File buildpdf(Long id);

	/**
	 * 根据id打印
	 * @param id 主键
	 * @return File
	 */
	File createReceptFile(Long id);

	/**
	 * 获取详情
	 * @param annualDonationExecuteMainVO
	 * @return
	 */
	R<AnnualDonationExecuteMainVO> getDetailObj(AnnualDonationExecuteMainVO annualDonationExecuteMainVO);

	/**
	 * 下载doc
	 *
	 * @param id
	 * @return
	 */
	File buildword(Long id, HttpServletResponse response);

	/**
	 * 接受数字宁波data
	 * @param data
	 * @return
	 */
	String saveAnnualDonationExecuteReform(String data);

    boolean checkJzjh(Long id);
}
